{include admin.inc.header}

{include admin.inc.top}

<div class="container-fluid content-body">
	<div class="main">
		{include admin.inc.menu}

		<section class="right-section" id="right-section">
			<!-- start of inner-frame -->
			<div class="inner-iframe">
				<ul class="breadcrumb">
					<li>
						<i class="glyphicon glyphicon-home"></i>
						<span>当前位置：</span>
						<a href="#">MPE管理</a>
						<i class="glyphicon glyphicon-chevron-right"></i>
						<a href="#">大塑账户注册</a>
					</li>
				</ul>

				<div class="inner-container">

					<form role="form" class="content-add-form form-horizontal" id="company-user-form" autocomplete="off">

						<div class="form-group">
							<label class="col-sm-2 control-label"><h4 class="text-primary">账户信息</h4></label>
						</div>

						<input type="hidden" name="data[type]" value="2"><!-- 企业用户 -->

						<div class="form-group">
							<label class="col-sm-2 control-label"><span class="asterisk">*</span>  手机号码</label>
							<div class="col-sm-10">
								<input type="text" dtype="mobile" name="data[username]" class="form-control" maxlength="11" placeholder="手机号码" required />
								<p class="help-block">请输入11位手机号</p>
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-2 control-label"><span class="asterisk">*</span>  登录密码</label>
							<div class="col-sm-10">
								<input type="password" name="data[password]" id="_password" handler="__checkPass(value, ele)" class="form-control" maxlength="20" min-length="6" placeholder="登录密码" required />
								<p class="help-block">6-20位数字和字母组合</p>
							</div>
						</div>
						<script>
							function __checkPass(value, ele) {
								if ( /^\d+$/.test(value) ) {
									$(ele).next().addClass("text-error").html('密码不能为纯数字');
									ele.focus();
									return false;
								}
								if ( /^[a-z|a-z]+$/.test(value) ) {
									$(ele).next().addClass("text-error").html('密码不能为纯字母');
									ele.focus();
									return false;
								}
								return true;
							}
						</script>

						<div class="form-group">
							<label class="col-sm-2 control-label"><span class="asterisk">*</span>  确认密码</label>
							<div class="col-sm-10">
								<input type="password"  dtype="repass" for-password="_password" class="form-control" maxlength="20" placeholder="确认密码" required />
								<p class="help-block"></p>
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-2 control-label"><span class="asterisk">*</span>  联系人</label>
							<div class="col-sm-10">
								<input type="text" name="data[contacter]" class="form-control" min-length="2" maxlength="15" placeholder="联系人" required />
								<p class="help-block">至少两个字符</p>
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-2 control-label"><span class="asterisk">*</span>  性别</label>
							<div class="col-sm-10">
								<div>
									<label class="icheck-label"><input type="radio" name="data[sex]" value="0" class="icheck" checked> 先生</label>
									<label class="icheck-label"><input type="radio" name="data[sex]" value="1" class="icheck"> 女士</label>
								</div>
								<p class="help-block"></p>
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-2 control-label">邮箱</label>
							<div class="col-sm-10">
								<input type="text" name="data[email]" maxlength="50" dtype="email" class="form-control" placeholder="邮箱" />
								<p class="help-block"></p>
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-2 control-label">QQ</label>
							<div class="col-sm-10">
								<input type="text" name="data[qq]" class="form-control" maxlength="20" placeholder="QQ" />
								<p class="help-block"></p>
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-2 control-label"><h4 class="text-primary">企业信息</h4></label>
						</div>

						<div class="form-group">
							<label class="col-sm-2 control-label"><span class="asterisk">*</span>  公司名称</label>
							<div class="col-sm-10">
								<input type="text" name="company[company]"  maxlength="20"  class="form-control" placeholder="公司名称" required />
								<p class="help-block"></p>
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-2 control-label"><span class="asterisk">*</span>  地址</label>
							<div class="col-sm-10">
								<div id="area-select-box" class="form-inline area-select"></div>
								<input type="text" name="company[address]" maxlength="20"  class="form-control" placeholder="街道地址" required />
								<p class="help-block"></p>
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-2 control-label">邮政编码</label>
							<div class="col-sm-10">
								<input type="text" name="company[zipcode]" maxlength="6"  class="form-control" placeholder="邮政编码" />
								<p class="help-block"></p>
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-2 control-label">注册资金</label>
							<div class="col-sm-10">
								<input type="text" dtype="float" name="company[register_capital]" maxlength="20"   class="form-control" placeholder="注册资金" />
								<p class="help-block">最多保留2位小数，单位万元</p>
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-2 control-label"><span class="asterisk">*</span> 企业类别</label>
							<div class="col-sm-10">
								<div class="checkbox-group">
									{loop $appConfigs[company_type] $key $value}
									<label class="icheck-label"><input type="radio" name="company[type]" value="{$key}" class="icheck" {if $key==1}checked{/if}> {$value}</label>
									{/loop}
								</div>
								<p class="help-block"></p>
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-2 control-label"><span class="asterisk">*</span> 主营行业</label>
							<div class="col-sm-10">
								<div class="checkbox-group">
									{loop $appConfigs[company_main_business] $key $value}
									<label class="icheck-label">
										<input type="checkbox" name="main_business[]" class="icheck" min-check="1" cname="主营行业" value="{$key}" required>
										{$value}</label>
									{/loop}
								</div>
								<p class="help-block"></p>
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-2 control-label"><h4 class="text-primary">交易信息</h4></label>
						</div>

						<div class="form-group">
							<label class="col-sm-2 control-label"><span class="asterisk">*</span> 法定代表人</label>
							<div class="col-sm-10">
								<input type="text" name="company[legal_person]" maxlength="20"  class="form-control" placeholder="法定代表人" required />
								<p class="help-block"></p>
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-2 control-label"><span class="asterisk">*</span> 法定代表人手机</label>
							<div class="col-sm-10">
								<input type="text" name="company[mobile]" dtype="mobile"  class="form-control" placeholder="法定代表人手机" required />
								<p class="help-block"></p>
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-2 control-label"><span class="asterisk">*</span> 法人身份证</label>
							<div class="col-sm-10">
								<div class="form-inline">
									<input type="text" name="company[idcard_no]" dtype="idnum"  class="form-control" placeholder="法人身份证" required />
											<span class="icon-group">
												<i class="glyphicon glyphicon-open jupload" title="上传"></i>
												<input type="hidden" name="company[idcard_positive]" empty-message="请上传身份证正面" required>
												<i class="glyphicon glyphicon-picture img-view" data-src="" title="预览"></i>
												<span style="margin-right: 20px; margin-left: 10px;">正面照</span>
												<i class="glyphicon glyphicon-open jupload" title="上传"></i>
												<input type="hidden" name="company[idcard_opposite]" empty-message="请上传身份证背面" required>
												<i class="glyphicon glyphicon-picture img-view" data-src="" title="预览"></i>
												<span style="margin-right: 20px; margin-left: 10px;">背面照</span>
											</span>

								</div>

								<p class="help-block"></p>
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-2 control-label"><span class="asterisk">*</span> 证书</label>
							<div class="col-sm-10">
								<div>
									<label class="icheck-label"><input type="radio" name="company[three_in_one]" value="0" class="icheck" checked> 企业三证</label>
									<label class="icheck-label"><input type="radio" name="company[three_in_one]" value="1" class="icheck" id="three_in_one"> 三证合一</label>
								</div>
								<p class="help-block"></p>
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-2 control-label"><span class="asterisk">*</span> 营业执照</label>
							<div class="col-sm-10">
								<div class="form-inline">
									<input type="text" name="company[license]" maxlength="20" class="form-control" placeholder="营业执照" required />
											<span class="icon-group">
												<i class="glyphicon glyphicon-open jupload" title="上传"></i>
												<input type="hidden" name="company[license_pic]"  empty-message="请上传营业执照" required>
												<i class="glyphicon glyphicon-picture img-view" data-src="" title="预览"></i>
											</span>

								</div>
								<p class="help-block"></p>
							</div>
						</div>

						<div class="form-group" id="taxno">
							<label class="col-sm-2 control-label"><span class="asterisk">*</span> 税务登记号</label>
							<div class="col-sm-10">
								<div class="form-inline">
									<input type="text" name="company[taxno]" maxlength="20" class="form-control" placeholder="税务登记号" required />
											<span class="icon-group">
												<i class="glyphicon glyphicon-open jupload" id="taxno-upload" title="上传"></i>
												<input type="hidden" name="company[taxno_pic]"  empty-message="请上传税务登记证明" required>
												<i class="glyphicon glyphicon-picture img-view" id="taxno-view" data-src="" title="预览"></i>
											</span>
								</div>
								<p class="help-block"></p>
							</div>
						</div>

						<div class="form-group" id="orgcode">
							<label class="col-sm-2 control-label"><span class="asterisk">*</span> 组织机构代码证</label>
							<div class="col-sm-10">
								<div class="form-inline">
									<input type="text" name="company[orgcode]"  class="form-control" placeholder="组织机构代码证" required />
											<span class="icon-group">
												<i class="glyphicon glyphicon-open jupload" title="上传"></i>
												<input type="hidden" name="company[orgcode_pic]" maxlength="20" empty-message="请上传组织机构代码证" required>
												<i class="glyphicon glyphicon-picture img-view" id="orgcode-view" data-src="" title="预览"></i>
											</span>

								</div>
								<p class="help-block"></p>
							</div>
						</div>

						<div class="form-group">
							<div class="col-sm-offset-2 col-sm-10">
								<div class="btn-group btn-group-or">
									<a href="{$insert_url}" class="btn btn-primary ajaxproxy"
									   proxy='{"method":"post", "formId":"company-user-form", "location":"/admin/mpe/add"}'>提交保存</a>
									<span class="or">OR</span>
									<button type="reset" class="btn btn-default">重置表单</button>
								</div>
							</div>
						</div>

					</form>


				</div><!-- end of inner container -->

			</div><!-- end of inner frame-->

		</section>

	</div>
</div>

{include admin.inc.footer}

<script>
	seajs.use("paymentUser", function(exports) {
		exports.init();
		exports.upload();
	});
</script>
</body>
</html>
